

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>${Inter.printOut('Project Prognosis',session.language)}</title>
    </head>
    <body>
        <div class="undernav">            
           
            <!-- This is the help button. -->
            <%  def help = Help.findByNameAndLanguage("project_list", session.language)
            def helplink = createLink(action:'show', controller:'help', id: help.id )%>
            <a href="#" onClick="MyWindow=window.open('${helplink}','Help','width=350,height=450'); return false;">${Inter.printOut('Help',session.language)}</a>
            <!-- This is the end of the help button. -->

        </div>
      <g:btnMode mode="${session.mode}" currentView="list" currentController="project"></g:btnMode>
        <div class="body">
            
            <h1>${Inter.printOut('Project Prognosis',session.language)}</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            
            <g:each in="${areaList}" status="i" var="areaInstance">
              <div class="list">
                <table>
                <thead>
                  <tr>
                  <th>${areaInstance.name}</th>
                  <th>${Inter.printOut('Project',session.language)}</th>
                  <th>${Inter.printOut('Known Cost',session.language)}</th>
                  <th>${Inter.printOut('Expected Cost',session.language)}</th>
                  <th>${Inter.printOut('Known Income',session.language)}</th>
                  <th>${Inter.printOut('Expected Income',session.language)}</th>
                  <th></th>
                  </tr>
                </thead>
                <tbody>
                  <g:each in="${areaInstance.projects}" status="j" var="projectInstance">
                    <g:if test="${ModeAccess.isAvailableInCurrentMode(session.mode,projectInstance.mode)}">
                      <tr class="${(j % 2) == 0 ? 'odd' : 'even'}">
                        <td></td>
                        <td>${projectInstance.name}</td>
                        <td>${projectInstance.calcKnownCost(thisYear-past,thisYear+future)}</td>
                        <td>${projectInstance.calcExpectedCost(thisYear-past,thisYear+future)}</td>
                        <td>${projectInstance.calcKnownIncome(thisYear-past,thisYear+future)}</td>
                        <td>${projectInstance.calcExpectedIncome(thisYear-past,thisYear+future)}</td>
                        <td></td>
                      </tr>
                    </g:if>
                  </g:each>
                    <tr class="summation">
                      <td></td>
                      <td colspan="2">${totalCost[i]}</td>
                      <td colspan="2">${totalIncome[i]}</td>
                      <td></td>
                    </tr>
                </tbody>
                </table>              
              </div>
            </g:each>
        </div>
    </body>
</html>
